<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>subscribeBy</title>
    <link href="../../images/logo-icon.svg" rel="icon" type="image/svg">
    <script>var pathToRoot = "../../";</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
const savedDarkMode = storage ? JSON.parse(storage) : false
if(savedDarkMode === true){
    document.getElementsByTagName("html")[0].classList.add("theme-dark")
}</script>
<script type="text/javascript" src="../../scripts/sourceset_dependencies.js" async="async"></script>
<link href="../../styles/style.css" rel="Stylesheet">
<link href="../../styles/jetbrains-mono.css" rel="Stylesheet">
<link href="../../styles/main.css" rel="Stylesheet">
<link href="../../styles/prism.css" rel="Stylesheet">
<link href="../../styles/logo-styles.css" rel="Stylesheet">
<script type="text/javascript" src="../../scripts/clipboard.js" async="async"></script>
<script type="text/javascript" src="../../scripts/navigation-loader.js" async="async"></script>
<script type="text/javascript" src="../../scripts/platform-content-handler.js" async="async"></script>
<script type="text/javascript" src="../../scripts/main.js" defer="defer"></script>
<script type="text/javascript" src="../../scripts/prism.js" async="async"></script>
</head>
<body>
<div class="navigation-wrapper" id="navigation-wrapper">
    <div id="leftToggler"><span class="icon-toggler"></span></div>
    <div class="library-name">
            <a href="../../index.html">
                    <span>qplayer2-ext</span>
            </a>
    </div>
    <div>
    </div>
    <div class="pull-right d-flex">
        <button id="theme-toggle-button"><span id="theme-toggle"></span></button>
        <div id="searchBar"></div>
    </div>
</div>
<div id="container">
    <div id="leftColumn">
        <div id="sideMenu"></div>
    </div>
    <div id="main">
<div class="main-content" id="content" pageIds="qplayer2-ext::com.qiniu.qplayer2ext.common.rxjava3//subscribeBy/io.reactivex.rxjava3.core.Single[TypeParam(bounds=[kotlin.Any?])]#kotlin.Function1[com.qiniu.qplayer2ext.common.rxjava3.SingleSubscriberBuilder[TypeParam(bounds=[kotlin.Any?])],kotlin.Unit]/PointingToDeclaration//-395598746">
  <div class="breadcrumbs"><a href="../../index.html">qplayer2-ext</a><span class="delimiter">/</span><a href="index.html">com.qiniu.qplayer2ext.common.rxjava3</a><span class="delimiter">/</span><a href="subscribe-by.html">subscribeBy</a></div>
  <div class="cover ">
    <h1 class="cover"><span>subscribe</span><wbr></wbr><span><span>By</span></span></h1>
  </div>
  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":qplayer2-ext:dokkaHtml/release"><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/CheckResult.html"><span class="token annotation">CheckResult</span></a></div></div><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt; </span><span data-unresolved-link="io.reactivex.rxjava3.core/Single///PointingToDeclaration/">Single</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><a href="subscribe-by.html"><span class="token function">subscribeBy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">initializer<span class="token operator">: </span><span class="token keyword"></span><a href="-single-subscriber-builder/index.html">SingleSubscriberBuilder</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">DSL way to subscribe to <span data-unresolved-link="io.reactivex.rxjava3.core/Single///PointingToDeclaration/">Single</span>. Sample:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Single.create { ... }   // Or any Single<br>    .subscribeBy {<br>        onSuccess {  }   // Or successConsumer(...), or omitted for no-op.<br>        onError {  }     // Or errorConsumer(...), or omitted for default error handling.<br>    }</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><br><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/CheckResult.html"><span class="token annotation">CheckResult</span></a></div></div><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt; </span><span data-unresolved-link="io.reactivex.rxjava3.core/Maybe///PointingToDeclaration/">Maybe</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><a href="subscribe-by.html"><span class="token function">subscribeBy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">initializer<span class="token operator">: </span><span class="token keyword"></span><a href="-maybe-subscriber-builder/index.html">MaybeSubscriberBuilder</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">DSL way to subscribe to <span data-unresolved-link="io.reactivex.rxjava3.core/Maybe///PointingToDeclaration/">Maybe</span>. Sample:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Maybe.create { ... }   // Or any Maybe<br>    .subscribeBy {<br>        onSuccess {  }   // Or successConsumer(...), or omitted for no-op.<br>        onComplete {  }  // Or completeAction(...), or omitted for no-op.<br>        onError {  }     // Or errorConsumer(...), or omitted for default error handling.<br>    }</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><br><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/CheckResult.html"><span class="token annotation">CheckResult</span></a></div></div><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt; </span><span data-unresolved-link="io.reactivex.rxjava3.core/Flowable///PointingToDeclaration/">Flowable</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><a href="subscribe-by.html"><span class="token function">subscribeBy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">initializer<span class="token operator">: </span><span class="token keyword"></span><a href="-observable-flowable-subscriber-builder/index.html">ObservableFlowableSubscriberBuilder</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token punctuation">, </span><span class="token keyword"></span><span data-unresolved-link="org.reactivestreams/Subscription///PointingToDeclaration/">Subscription</span><span class="token operator">&gt;</span><span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">DSL way to subscribe to <span data-unresolved-link="io.reactivex.rxjava3.core/Flowable///PointingToDeclaration/">Flowable</span>. Sample:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Flowable.create { ... }   // Or any Flowable<br>    .subscribeBy {<br>        onNext {  }      // Or nextConsumer(...), or omitted for no-op.<br>        onComplete {  }  // Or completeAction(...), or omitted for no-op.<br>        onError {  }     // Or errorConsumer(...), or omitted for default error handling.<br>    }</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><br><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/CheckResult.html"><span class="token annotation">CheckResult</span></a></div></div><span class="token keyword">inline </span><span class="token keyword">fun </span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt; </span><span data-unresolved-link="io.reactivex.rxjava3.core/Observable///PointingToDeclaration/">Observable</span><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token operator">&gt;</span><span class="token punctuation">.</span><a href="subscribe-by.html"><span class="token function">subscribeBy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">initializer<span class="token operator">: </span><span class="token keyword"></span><a href="-observable-flowable-subscriber-builder/index.html">ObservableFlowableSubscriberBuilder</a><span class="token operator">&lt;</span><span class="token keyword"></span><a href="subscribe-by.html">T</a><span class="token punctuation">, </span><span class="token keyword"></span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="token operator">&gt;</span><span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">DSL way to subscribe to <span data-unresolved-link="io.reactivex.rxjava3.core/Observable///PointingToDeclaration/">Observable</span>. Sample:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Observable.create { ... }   // Or any Observable<br>    .subscribeBy {<br>        onNext {  }      // Or nextConsumer(...), or omitted for no-op.<br>        onComplete {  }  // Or completeAction(...), or omitted for no-op.<br>        onError {  }     // Or errorConsumer(...), or omitted for default error handling.<br>    }</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><br><div class="symbol monospace"><div class="block"><div class="block"><span class="token annotation">@</span><a href="https://developer.android.com/reference/kotlin/androidx/annotation/CheckResult.html"><span class="token annotation">CheckResult</span></a></div></div><span class="token keyword">inline </span><span class="token keyword">fun </span><span data-unresolved-link="io.reactivex.rxjava3.core/Completable///PointingToDeclaration/">Completable</span><span class="token punctuation">.</span><a href="subscribe-by.html"><span class="token function">subscribeBy</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">initializer<span class="token operator">: </span><span class="token keyword"></span><a href="-completable-subscriber-builder/index.html">CompletableSubscriberBuilder</a><span class="token punctuation">.</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator"> -&gt; </span><span class="token keyword"></span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><span data-unresolved-link="io.reactivex.rxjava3.disposables/Disposable///PointingToDeclaration/">Disposable</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">DSL way to subscribe to <span data-unresolved-link="io.reactivex.rxjava3.core/Completable///PointingToDeclaration/">Completable</span>. Sample:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Completable.create { ... }   // Or any Completable<br>    .subscribeBy {<br>        onComplete {  }  // Or completeAction(...), or omitted for no-op.<br>        onError {  }     // Or errorConsumer(...), or omitted for default error handling.<br>    }</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
</div>
        <div class="footer"><span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span
                class="pull-right"><span>Generated by </span><a
                href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
        </div>
    </div>
</div>
</body>
</html>
